<template>
  <el-dialog :visible="showDialog" title="弹层标题" @close="handleDialog">
    <!-- 表单内容 -->
    <el-form label-width="100px">
      <el-form-item label="权限名称">
        <el-input v-model="formData.name" />
      </el-form-item>
      <el-form-item label="权限标识">
        <el-input v-model="formData.code" />
      </el-form-item>
      <el-form-item label="权限描述">
        <el-input v-model="formData.description" />
      </el-form-item>
      <el-form-item label="权限启用">
        <el-switch
          v-model="formData.enVisible"
          active-text="启用"
          active-value="1"
          inactive-text="不启用"
          inactive-value="0"
        />
      </el-form-item>
    </el-form>

    <template #footer>
      <div style="text-align: right;">
        <el-button @click="showDialog = false">取消</el-button>
        <el-button type="primary">确定</el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script>
export default {
  name: 'AddPermission',
  props: {
    showDialog: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    handleDialog() {
      this.$emit('update:showDialog', false)
    }
  }
}
</script>

<style>

</style>
